namespace CRM.DataAccess.Entities
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    [Table("INVOICES")]
    public partial class INVOICE
    {
        public long ID { get; set; }

        public bool DELETED { get; set; }

        public long? CREATED_BY { get; set; }

        public DateTime DATE_ENTERED { get; set; }

        public long? MODIFIED_USER_ID { get; set; }

        public DateTime DATE_MODIFIED { get; set; }

        [StringLength(250)]
        public string SUBJECT { get; set; }

        [StringLength(250)]
        public string CUSTOMER_NO { get; set; }

        public long? CONTACT_ID { get; set; }

        public DateTime? INVOICE_DATE { get; set; }

        public DateTime? DUE_DATE { get; set; }

        [StringLength(100)]
        public string PURCHASE_ORDER { get; set; }

        [StringLength(100)]
        public string EXCISE_DUTY { get; set; }

        public double? SALES_COMMISSION { get; set; }

        public long ORGANIZATION_ID { get; set; }

        public long? STATUS_ID { get; set; }

        public long? ASSIGNED_TO { get; set; }

        [Required]
        [StringLength(250)]
        public string OFFICE_ADDRESS { get; set; }

        [Required]
        [StringLength(250)]
        public string HOME_ADDRESS { get; set; }

        [StringLength(250)]
        public string OFFICE_PO_BOX { get; set; }

        [StringLength(250)]
        public string HOME_PO_BOX { get; set; }

        [StringLength(250)]
        public string OFFICE_CITY { get; set; }

        [StringLength(250)]
        public string HOME_CITY { get; set; }

        [StringLength(250)]
        public string OFFICE_STATE { get; set; }

        [StringLength(250)]
        public string HOME_STATE { get; set; }

        [StringLength(250)]
        public string OFFICE_POSTAL_CODE { get; set; }

        [StringLength(250)]
        public string HOME_POSTAL_CODE { get; set; }

        [StringLength(250)]
        public string OFFICE_COUNTRY { get; set; }

        [StringLength(250)]
        public string HOME_COUNTRY { get; set; }

        public long? TERMS_CONDITIONS_ID { get; set; }

        public long? DESCRIPTION_ID { get; set; }

        public long? ITEM_ID { get; set; }

        [StringLength(50)]
        public string INVOICE_NUMBER { get; set; }

        public bool? SAVED_STATE { get; set; }
    }
}
